<?php
class Del extends Controller {
	public function json() {
		$nodeId = $this->post('nodeId', 'int');
				
		if(!$nodeId) $this->displayJSON(array('status' => -1, 'message' => '未知节点'));
		
		$mNode = new Node_model();
		$params = array('node_id' => $nodeId);
		$result = $mNode->delNode($params);
		if($result) $this->displayJSON(array('status' => 0, 'message' => '删除节点成功'));
		else $this->displayJSON(array('status' => -2, 'message' => '删除节点失败'));
	}
}